﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B303Langf.Parser.AST
{
   public class ArrayIndexer : AST
   {
      public ArrayIndexer()
      {

      }

      public ArrayIndexer( Expression expression )
      {
         IndexExpression = expression;
      }

      public Expression IndexExpression
      {
         get;
         private set;
      }

      public bool HasIndex
      {
         get
         {
            return IndexExpression != null;
         }
      }

      public override object Visit( IVisitor v, object obj )
      {
         return v.VisitArrayIndexer( this, obj );
      }
   }
}
